// 库存管理接口
import request from "@/common/request.js";
const api = {
  purchase_in: "/purchase_in/",
  purchase_order: "/purchase_order/",
  warehouse: "/warehouse/",
  product: "/product/",
  offer_order_mrp: "/offer_order_mrp/",
};
const puInApi = {
  get_purchase_in(params) {
    return request({
      url: api.purchase_in,
      method: "get",
      params,
    });
  },

  get_purchase_order(params) {
    return request({
      url: api.purchase_order,
      method: "get",
      params,
    });
  },

  get_warehouse(params) {
    return request({
      url: api.warehouse,
      method: "get",
      params,
    });
  },

  purchase_order_detail(id) {
    return request({
      url: api.purchase_order + id,
      method: "get",
    });
  },

  purchase_in_detail(id) {
    return request({
      url: api.purchase_in + id,
      method: "get",
    });
  },

  post_purchase_in(data) {
    return request({
      url: api.purchase_in,
      method: "post",
      data,
    });
  },

  patch_purchase_in(data, id) {
    return request({
      url: api.purchase_in + id + "/",
      method: "patch",
      data,
    });
  },

  delete_purchase_in(id) {
    return request({
      url: api.purchase_in + id + "/",
      method: "delete",
    });
  },
};
export default puInApi
